package cn.liyiming.bbsadmin.modular.system.warpper;

import cn.liyiming.bbsadmin.core.common.constant.factory.ConstantFactory;
import cn.stylefeng.roses.core.base.warpper.BaseControllerWrapper;

import java.util.List;
import java.util.Map;

/**
 * @program: bbsblog
 * @description: 文章类型的包装类
 * @author: 李一鸣
 * @create: 2020-03-05 15:08
 **/

public class ArticleTypeWrapper extends BaseControllerWrapper {

    public ArticleTypeWrapper(List<Map<String, Object>> multi) {
        super(multi);
    }
    public ArticleTypeWrapper(Map<String, Object> single) {
        super(single);
    }


    @Override
    protected void wrapTheMap(Map<String, Object> map) {
        map.put("parentName", ConstantFactory.me().getArticleTypeNameById((Integer) map.get("parentId")));
        map.put("statusName", ConstantFactory.me().getStatusName((Integer) map.get("avaible")));
    }
}
